Conversation
Soft deprecate PyUnicode_New(), PyUnicode_CopyCharacters(), PyUnicode_Fill(), PyUnicode_Resize(), PyUnicode_WRITE() and PyUnicode_WriteChar() functions. Use the PyUnicodeWriter API instead. Mention also that PyUnicodeWriter is not thread safe.
Documentation build overview
51 files changed ·
|
|
It looks like this should be a WG decision. I'd vote for it though. |
Ok. I created capi-workgroup/decisions#111 to get a decision from the C API Working Group. I added more details: list of PyPI affected project and mention that pythoncapi-compat provides the PyUnicodeWriter API on Python 3.6-3.13. |
test_capi.test_unicode: * Add tests on PyUnicode_New() and PyUnicode_Resize(). Check that the result is either a mutable string, or the empty string singleton. * Check that PyUnicode_Fill(), PyUnicode_CopyCharacters() and PyUnicode_WriteChar() fail to modify a string with 2 references. Adjust documentation.
|
The C API Working Group approved the soft deprecation: capi-workgroup/decisions#111 (comment). |
|
@vstinner auto-merge is failing because this requires a PR review (since it's labelled |
Ah right, there was a conflict. It's now solved. @picnixz added "type-feature" on the issue, and the PR inherited the label. It means that another core dev should review the change? |
|
Ah crap. I still think it's a feature but I don't think it needs a core dev approval... I don't like this new label stuff because this means we just can't make triaging better (I do appreciate when we know whether a change will be backported or not just by seeing the feature type). |
|
Would this work like that..? |
|
Ok, I think we need to come up with a better reading of when something needs a type-feature really. It totally breaks my triaging. |
The bot will just re-add it I'm afraid, although it works to merge if you do it shortly after and don't touch the PR. |
ZeroIntensity
left a comment
There was a problem hiding this comment.
I think the easiest solution is to just approve the PR :)
I left a few grammar nitpicks below. The rest of this looks good to me.
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Soft deprecate PyUnicode_New(), PyUnicode_CopyCharacters(), PyUnicode_Fill(), PyUnicode_Resize(), PyUnicode_WRITE() and PyUnicode_WriteChar() functions. Use the PyUnicodeWriter API instead.